'use strict'
const path = require('path');
const Koa = require('koa');
const static_server = require('koa-static');
const app = new Koa(); //充当 http server

const hostname = '127.0.0.1';
const port = 3000
const publicPath = path.join(__dirname, 'public');

app.use(static_server(publicPath));

app.listen(port, hostname, () => {
    console.log(`server running at http://${hostname}:${port}`);
})